home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
os2bbs
/
ftpfid16.zip
/
FTPMON.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-12-17
|
1KB
|
29 lines
/* TEST */
New=Directory('f:bbs\logs')
IF Stream('f:\bbs\logs\ftprpt.log','C', 'Query Exists') <>' ' Then
Do
rc = stream('f:\bbs\logs\ftprpt.log','C','open read')
total_sent = 0
total_rec = 0
total_time = 0
total_sec = 0
do until LINES('f:\bbs\logs\ftprpt.log') = 0
line = LINEIN('f:\bbs\logs\ftprpt.log')
parse var line dae mon yr sent stat sentmuch bytes dytes recmuch rest muchtime mo muchsec eee
total_sent = total_sent + sentmuch
total_rec = total_rec + recmuch
total_time = total_time + muchtime
total_sec = total_sec + muchsec
if total_sec > 59 then
do
total_time = total_time + 1
total_sec = total_sec - 60
end
end
end /* Do Until */
rc = stream('f:\bbs\logs\ftprpt.log','C','close')
say date('N') 'Monthly Stats: 'total_sent 'sent - 'total_rec 'recieved'
say total_time%60 'hours or 'total_time 'minutes 'total_sec 'secs'
'pause'